﻿using Max.PH5_2008A.ShoppingCode.Domain;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Max.PH5_2008A.ShoppingCode.EFCore
{
    public class PH52008ADbContext : DbContext
    {
        public PH52008ADbContext(DbContextOptions<PH52008ADbContext> options) : base(options) { }


        //protected internal override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) {
        //    optionsBuilder.UseSqlServer()
        //}

        public DbSet<MemeberInfoEntity> MemberInfos { get; set; }
        public DbSet<CityInfoEntity> CityInfos { get; set; }

        public DbSet<LogInfoEntity> LogInfos { get; set; }

        /*
         * 2023/2/28
         * 通过dbfirst生成的model，复制到此 - 商品模块
         * 
         * **/

        public virtual DbSet<TbCategorySpec> TbCategorySpecs { get; set; }

        public virtual DbSet<TbCategorySpecValue> TbCategorySpecValues { get; set; }

        public virtual DbSet<TbProductBrand> TbProductBrands { get; set; }

        public virtual DbSet<TbProductCategory> TbProductCategories { get; set; }

        public virtual DbSet<TbProductSku> TbProductSkus { get; set; }

        public virtual DbSet<TbProductSpu> TbProductSpus { get; set; }

        public virtual DbSet<TbProductSpuSpecValue> TbProductSpuSpecValues { get; set; }

        /*
         * 2023/3/2
         * 商品显示、详情示例
         * **/
        public DbSet<TbProductEntity> TbProducts { get; set; }
        public DbSet<TbProductImageEntity> TbProductImages { get; set; }

        /*
         * 2023/3/4
         * 新的spu/sku/spec/comment
         * 
         * **/

        public DbSet<NewProductSKUCommentEntity> NewProductSKUComments { get; set; }
        public DbSet<NewProductSKUEntity> NewProductSKU { get; set; }
        public DbSet<NewProductSKUImageEntity> NewProductSKUImages { get; set; }
        public DbSet<NewProductSpecEntity> NewProductSpec { get; set; }
        public DbSet<NewProductSPUEntity> NewProductSPU { get; set; }

        /*
         * 2023/3/9
         * **/
        public DbSet<MemberAddressEntity> MemberAddress { get; set; }

        /*
         * 2023/3/10 order 
         * **/
        public DbSet<OrderDetailEntity> OrderDetails { get; set; }
        public DbSet<OrderMasterEntity> OrderMasters { get; set; }
    }
}
